from tortoise import fields
from .base import BaseModel, TimestampMixin

class Customers(BaseModel, TimestampMixin):
    qymc = fields.CharField(max_length=255, null=True, description="企业名称")
    qysh = fields.CharField(max_length=255, null=True, description="企业税号")
    zjqk = fields.CharField(max_length=255, null=True, description="资金缺口")
    kp24 = fields.CharField(max_length=255, null=True, description="2024年开票")
    kp23 = fields.CharField(max_length=255, null=True, description="2023年开票")
    name = fields.CharField(max_length=255, null=True, description="法人姓名")
    sfz = fields.CharField(max_length=255, null=True, description="身份证号码")
    phone = fields.CharField(max_length=255, null=True, description="手机号码")
    address = fields.CharField(max_length=255, null=True, description="企业地址")
    yh_no = fields.CharField(max_length=255, null=True, description="银行卡号")
    yh_khh = fields.CharField(max_length=255, null=True, description="开户行")
    yh_phone = fields.CharField(max_length=255, null=True, description="预留手机号")
    hyzk = fields.CharField(max_length=255, null=True, description="婚姻状况")
    po_name = fields.CharField(max_length=255, null=True, description="配偶姓名")
    po_phone = fields.CharField(max_length=255, null=True, description="配偶手机号")
    po_sfz = fields.CharField(max_length=255, null=True, description="配偶身份证号")
    contact1 = fields.CharField(max_length=255, null=True, description="紧急联系人1")
    contact2 = fields.CharField(max_length=255, null=True, description="紧急联系人2")
    sfz_z = fields.CharField(max_length=255, null=True, description="法人身份证正面")
    sfz_f = fields.CharField(max_length=255, null=True, description="法人身份证反面")
    yyzz = fields.CharField(max_length=255, null=True, description="营业执照副本")
    price = fields.IntField(default=0, null=True, description="金额")
    add_uid = fields.IntField(default=0, null=True, description="归属经理")
    status = fields.IntField(default=0, null=True, description="状态")
    class Meta:
        table = "Customers"

class CustomersFollow(BaseModel, TimestampMixin):
    qymc = fields.CharField(max_length=255, null=True, description="企业名称")
    qysh = fields.CharField(max_length=255, null=True, description="企业税号")
    name = fields.CharField(max_length=255, null=True, description="法人姓名")
    yh_no = fields.CharField(max_length=255, null=True, description="银行卡号")
    yh_khh = fields.CharField(max_length=255, null=True, description="开户行")
    yh_phone = fields.CharField(max_length=255, null=True, description="预留手机号")
    class Meta:
        table = "Customers_follow"
